# encoding: utf-8
require 'rubygems'
require 'mysql2'
require 'active_record'

class DbConnector
  def initialize
    ActiveRecord::Base.establish_connection(
        :adapter => "mysql2",
        :host => "localhost",
        :database => "diyhome",
        :username => "root",
        :password => "guavaguava00"
        # :encoding=>"UTF8"
    )

  end
end
# dbt=Dbtest.new
# class Goods<ActiveRecord::Base
#
# end
#
# goods=Goods.find(453)
# puts goods.title